package com.spring;

import com.mybatis.bean.Book;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.beans.factory.annotation.Autowired;

public class SpringTest {
//    @Autowired
//    Book book;
    public static void main(String[] args) {
//        SpringTest springTest=new SpringTest();
//        System.out.println(springTest.book.getBook_name());
        ApplicationContext context=new ClassPathXmlApplicationContext("springContext.xml");
        Book book= context.getBean("book",Book.class);
        System.out.println(book);
//        System.out.println(springTest.book);

    }
}
